{
  "properties" : { },
  "id" : "9f232ddc886543e88912ecb5888e044b",
  "script" : null,
  "groupId" : "b4225d8d7f6d47988e05788c9c671d66",
  "name" : "删除连线",
  "createTime" : 1727071058081,
  "updateTime" : 1726799044672,
  "lock" : "1",
  "createBy" : "ndmp",
  "updateBy" : "ndmp",
  "path" : "remove",
  "method" : "POST",
  "parameters" : [ ],
  "options" : [ ],
  "requestBody" : "{\r\n    \"localDeviceId\": \"D2173343257502001764\",\r\n    \"targetDeviceId\": \"D1814237884760947677\"\r\n}",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"code\": 200,\n    \"msg\": \"ok\",\n    \"data\": \"\",\n    \"success\": true\n}",
  "description" : null,
  "requestBodyDefinition" : null,
  "responseBodyDefinition" : null
}
================================
       import response;
       //正向连线
       var val = db.transaction(() => {
           // QueryWrapper<NetDeviceLinkChart> wrapper1 = new QueryWrapper<>();
           // wrapper1.eq("if_auto",1).eq("DEVICE_ID",line.getLocalDeviceId())
           //         .eq("TARGET_DEVICEID",line.getTargetDeviceId()).orderByDesc("COLLECT_TIME")
           //         .last("limit 1");
           // NetDeviceLinkChart one1 = NetDeviceLinkChartUtil.netDeviceLinkChart.getOne(wrapper1);
           var one1 = db.table("NET_DEVICE_LINK_CHART").where().eq("if_auto", 1).eq("device_id", body.localDeviceId)
               .eq("target_deviceid", body.targetDeviceId).orderByDesc("collect_time").selectOne();
           if (one1 == null || one1.id == null) {
               return response.json({
                   "code": 200,
                   "msg": "ok",
                   "data": null,
                   "success": false
               })
           }
           db.table("NET_DEVICE_LINK_CHART").where().eq("id",one1.id).delete();
         //  NetDeviceLinkChartUtil.netDeviceLinkChart.removeById(one1.getId());
           //反向连线
        //    QueryWrapper < NetDeviceLinkChart > wrapper2 = new QueryWrapper < > ();
        //    wrapper2.eq("if_auto", 1).eq("DEVICE_ID", line.getTargetDeviceId())
        //        .eq("TARGET_DEVICEID", line.getLocalDeviceId()).orderByDesc("COLLECT_TIME")
        //        .last("limit 1");
        //    NetDeviceLinkChart one2 = NetDeviceLinkChartUtil.netDeviceLinkChart.getOne(wrapper2);
       var one2 =  db.table("NET_DEVICE_LINK_CHART").where().eq("if_auto", 1).eq("device_id", body.targetDeviceId)
        .eq("target_deviceid", body.localDeviceId).orderByDesc("collect_time").selectOne();
           
           if (one2 == null || one2.id == null) {
              return response.json({
                   "code": 200,
                   "msg": "ok",
                   "data": null,
                   "success": false
               })
           }
            db.table("NET_DEVICE_LINK_CHART").where().eq("id",one2.id).delete();
       })
        return response.json({
                   "code": 200,
                   "msg": "ok",
                   "data": val,
                   "success": true
               })